*{ Display a post in one of these modes: 'full', 'home' or 'teaser'}*

<div class="post ${_as == 'teaser' ? 'teaser' : ''}">
	<h2 class="post-title">
		<a href="@{Application.show(_post.id)}">${_post.title}</a>
	</h2>
	<div class="post-metadata>">
		<span class="post-author">by ${_post.author.fullname}</span>,
		<span class="post-date">${_post.postedAt.format('dd MMM yy')}</span>
		#{if _as != 'full'}
			<span class="post-comments">
				&nbsp;|&nbsp;${_post.comments.size() ?: 'no'}
				comment${_post.comments.size().pluralize()}
				#{if _post.comments}
					, latest by ${_post.comments[0].author}
				#{/if}
			</span>
		#{/if}
		#{elseif _post.tags}
			<span class="post-tags">
				- Tagged
				#{list items:_post.tags, as:"tag"}
					<a href="@{Application.listTagged(tag.name)}">${tag}</a>${tag_isLast ?"":","}
				#{/list}
			</span>
		#{/elseif}
	</div>
	#{if _as != 'teaser'}
		<div class="post-content">
			<div class="about">Detail: </div>
			${_post.content.nl2br()}
		</div>
	#{/if}
</div>

#{if _as == 'full'}
	<div class="comments">
		<h3>
			${_post.comments.size()?: 'no'}
			comment${_post.comments.size().pluralize()}
		</h3>
		
		#{list items:_post.comments, as:'comment'}
			<div class="comment">
				<div class="comment-metadata">
					<span class="comment-author">by ${comment.author}</span>
					<span class="comment-date">
						${comment.postedAt.format('dd MMM yy')}
					</span>
				</div>
				<div class="comment-content">
					<div class="about">Detail: </div>
					${comment.content.escape().nl2br()}
				</div>
			</div>
		#{/list}
	</div>
#{/if}